<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>详情页</title>
</head>
<body>
<h1>{{ book.btitle }}</h1>

<table border="1px">
    <thead>
    <tr style="background-color: gray">
        <td> ID</td>
        <td>姓名</td>
        <td>内容</td>
    </tr>
    </thead>
    <tbody>
    {% for hero in book.heroinfo_set.all %}
        <tr style="background-color:{% cycle 'red' 'blue' %}">
            <td>{{ hero.id }}</td>
            <td>{{ hero.hname }}</td>
            <td>{{ hero.hcontent }}</td>
        </tr>
    {% endfor %}
    </tbody>

</table>

</body>
</html>